<template>
	<Row :gutter="16">
		<ICol span="6"><IInput  placeholder="模版内容" v-model="param.content" @on-enter="search" clearable></IInput></ICol>
        <ICol span="3">
            <Select v-model="param.config_id" placeholder="请选择服务商" @on-change="search" clearable>
                <Option v-for="config_id in config_ids" :value="config_id.id" :key="config_id.id">{{config_id.desc}}</Option>
            </Select>
        </ICol>
        <ICol span="3">
            <Select v-model="param.module" placeholder="请选择短信模块" @on-change="search" clearable>
                <Option v-for="module in modules" :value="module.value" :key="module.value">{{module.name}}</Option>
            </Select>
        </ICol>
		<ICol span="5" ><IButton type="primary" @click="search">搜索</IButton></ICol>
	</Row>
</template>
<script>
import {Row,Col,Input,Button, Select, Option, OptionGroup } from 'iview';

export default{
    props:{
        callback:{type:Function}
    },
	components:{
		Row,
        'ICol':Col,
        'IInput' : Input,
        'IButton' : Button,
        Select,
        Option,
    },
    data () {
        return {
        	param :{
        		content : '',
                config_id : 0,
                module : '',
        	},
            config_ids : [],
            modules : [],
        }
    },
    methods: {
    	search(){
    		this.callback(this.param);
    	}
    }

}
</script>